//
//  HWjiaoyijiemianCollectionViewCell.m
//  HWanGame
//
//  Created by 陈道斌 on 2020/12/21.
//  Copyright © 2020 Chendaobin. All rights reserved.
//

#import "HWjiaoyijiemianCollectionViewCell.h"


@interface HWjiaoyijiemianCollectionViewCell()


@property(strong,nonatomic) UIView *baiseView;
@property(strong,nonatomic) UIImageView *icoimageView;
@property(strong,nonatomic) UILabel *mingchengLabel;
@property(strong,nonatomic) UILabel *jineRlabel;





@end

@implementation HWjiaoyijiemianCollectionViewCell


- (instancetype)initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame:frame]) {
        
        [self setupUI];
         
    }
    
    
    return  self;
}



- (void)setupUI {
    
    
    self.contentView.backgroundColor = RGB(247, 247, 247);
    
    self.baiseView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 148, 72)];
    self.baiseView.frame = CGRectMake(0, 0, 148, 72);
    
    self.baiseView.layer.cornerRadius = 16;
    self.baiseView.layer.masksToBounds = YES;
    self.baiseView.backgroundColor  = [UIColor whiteColor];
    [self.contentView addSubview:self.baiseView];
    
    
    self.icoimageView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 52, 52)];
    self.icoimageView.backgroundColor = [UIColor clearColor];
    self.icoimageView.layer.cornerRadius = 8;
    self.icoimageView.layer.masksToBounds = YES;
    [self.baiseView addSubview:self.icoimageView];
    
    
    
    
    
     
    
    
     UILabel *nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.icoimageView.right+5,10,75, 20)];
     nameLabel.backgroundColor = [UIColor clearColor];
     nameLabel.textAlignment = NSTextAlignmentLeft;
     nameLabel.font = [UIFont systemFontOfSize:14];
     nameLabel.textColor = RGB(68, 68, 68);
     nameLabel.text = @"全服第一…";
      self.mingchengLabel = nameLabel;
    
    [self.baiseView addSubview:nameLabel];
    
    
    
    UILabel *nameLabel1 = [[UILabel alloc]initWithFrame:CGRectMake(self.icoimageView.right+5,nameLabel.bottom+10,75, 20)];
      nameLabel1.backgroundColor = [UIColor clearColor];
      nameLabel1.textAlignment = NSTextAlignmentLeft;
      nameLabel1.font = [UIFont systemFontOfSize:14];
      nameLabel1.textColor = RGB(246, 106, 5);
      nameLabel1.text = @"￥999";
      self.jineRlabel = nameLabel1;
      [self.baiseView addSubview:nameLabel1];
        
    
    
    
    
}


-(void)setDataModel:(HWjiaoyiModel *)dataModel {
    
    _dataModel = dataModel;
    
    [self.icoimageView sd_setImageWithURL:[NSURL URLWithString:dataModel.icon] placeholderImage:nil];
    self.mingchengLabel.text = [NSString stringWithFormat:@"%@",dataModel.name];
    self.jineRlabel.text = [NSString stringWithFormat:@"%@",dataModel.money];
    
    
    
}

@end
